package bbs.model;

import java.util.ArrayList;
import java.util.Collection;


public class EntityList<E extends bbs.model.Entity> extends ArrayList<E> { 
	
	private static final long serialVersionUID = -9120501779054244665L;
	
	private PageList pageList = new PageList();

	public EntityList() {
		super(); 
	}

	public EntityList(Collection<? extends E> c) {
		super(c);  
		
		if( this.size() > 0 ) {
			E firstEntity = super.get( 0 );
			this.pageList = PageList.creatPageList( firstEntity );
		}
	}

	public EntityList(int initialCapacity) {
		super(initialCapacity); 
	} 
	
	public PageList getPageList() {
		return this.pageList;
	}

}
